A connection was successfully established with the server, but then an error occurred during the login process

A connection was successfully established with the server, but then an error occurred during the login process


اگر خطای زیر را دریافت می کنید:

SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)]

عبارت زیر را به Connection String اضافه کنید:

TrustServerCertificate=True

سید حامد واحدی سید حامد واحدی     22 بهمن 1402